﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="NewsList.ascx.cs" Inherits="X.WebSite.Controls.NewsList" %>
<table border="0" cellpadding="0" cellspacing="0" width="271px">
    <tr>
        <td rowspan="2" valign="top">
        </td>
        <td>
            <b>News</b>
        </td>
    </tr>
    <tr>
        <td valign="top">
            <%
                System.Collections.Generic.IList<X.Entity.NewsInfo> list = X.Bll.News.GetList(5);

                foreach (X.Entity.NewsInfo newsInfo in list)
                {
                    Response.Write(string.Format("<a href=\"/News/{0}.aspx\" title=\"{1}\">{2}</a><br />", newsInfo.Id, X.Common.StringUtils.HtmlDecode(newsInfo.Title), X.Common.StringUtils.SubString(X.Common.StringUtils.HtmlDecode(newsInfo.Title), 45, "...")));
                }
            %>
        </td>
    </tr>
    <tr>
        <td colspan="2" align="right">
            <a href="/News/List.aspx" title="News List">more>></a>
        </td>
    </tr>
</table>
